package com.example.seckill.service.model;

import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class UserModel {
    private Integer id;

    @NotBlank(message = "用户名不能为空")
    private String name;

    @NotNull(message = "性别不能为空")
    private Byte gender;

    @NotNull(message = "年龄不能为空")
    @Min(value = 0,message = "年龄不符合")
    @Max(value = 100,message = "年龄不符合")
    private Integer age;

    @NotBlank(message = "手机不能为空")
    private String telphone;

    private String registerMode;

    private String thirdPartyId;

    private String encryptPassword;

    private String code;
}
